import pagination from '@/admin/component/pagination';
export default {
  mounted() {
    this.init();
  },
  data() {
    return {
      search: {},
      tableData: [],
      page: { page: 1, size: 30, total: 0 },
    };
  },
  components: { pagination },
  methods: {
    init() {
      this.$http.post('api/book/list', this.page).then((res) => {
        this.page.total = res.count;
        this.tableData = res.rows;
      });
    },
    paginationChange(val) {
      this.page = val;
      this.init();
    },
    onSubmit() {
      console.log('查询');
    },
    edit(item) {
      console.log(item, '我正在编辑');
    },
    del(item) {
      console.log(item, '我正在编辑');
    },
  },
  computed: {},
};
